<template>
    <v-container>
<!--        范围：开始，个数/结束；字母在前/后，大小写,数字的循环范围-->
<!--        循环范围：无：从开始到z然后继续；c-y：从c开始到y结束，然后循环-->
<!--        生成样式：拖拽或者点击添加，字母，符号，数字，拖拽或点击添加小组件，每个组件可以设置数字/字母，循环-->
<!--        拖拽后下方展示生成样式示例-->
<!--        固定，循环-->
<!--        上方使用图片展示生成后的不同样式，点击图片，自动根据图片修改下方配置-->
        <button @click="doGenerate()">generate</button>
        <copy-button buttonName="生成并复制到剪贴板" :content="result"></copy-button>
    </v-container>
</template>

<script>
    import CopyButton from "@/components/CopyButton"
    export default {
        name: "Generator",
        components: {
            CopyButton
        },
        data: () => ({
            result: ''
        }),
        methods: {
            doGenerate() {
                let [l_1, l1, n1] = [0, 0, 0];// l：letter，n：number，l_1向左扩展字母第一列，eg：AB7中的A
                let start = 'A';
                let end = 'Z';
                let l1s = start.charCodeAt();
                let l_1s = 65;
                n1 = 13;
                // l1s = 99;
                for (let i = 0; i < 100; i++) {
                    console.log(l1s);
                    if (l1s >= 65 && l1s <= 90) {
                        // console.log(String.fromCharCode(l_1) + String.fromCharCode(l1s++) + n1);
                        this.result += String.fromCharCode(l_1) + String.fromCharCode(l1s++) + n1 + ',';
                    } else {
                        console.log('into else');
                        l1s = 65;
                        if (l_1 === 0) {
                            l_1 = 65;
                        } else {
                            l_1++;
                        }
                    }
                }
                console.log(this.result);
            }
        }
    }
</script>

<style scoped>

</style>
